﻿' ------------------------------------------------------------------------------
' A simple class that stores the DataRow for a photo and fires an event
' when the row is replaced.
' ------------------------------------------------------------------------------
' This file is part of the SQL Server 2008 Technology Demonstration. This
' application was designed and coded by Eric Weitzman, LandTime Inc, for
' Microsoft Corporation. Contact Ed Katibah at Microsoft about this demo.
' Copyright © 2008 Microsoft Corporation. All rights reserved.
' ------------------------------------------------------------------------------

Public Class Photo

    Public Event Changed()

    Dim m_row As DataRow

    Public Property Row() As DataRow
        Get
            Return m_row
        End Get
        Set(ByVal value As DataRow)
            If value Is m_row Then Return
            m_row = value
            ReportTrace("set current photo to guid: " & Row.Item("RowGuid").ToString)
            RaiseEvent Changed()
        End Set
    End Property
End Class
